<template>
	<view>
		<commonHeader :title="$t('oi1')"></commonHeader>

		<view class="gHeadbox"></view>
		<view class="invite">
			<view class="invite_box">
				<view class="invite_box_rablove">
					<view class="invite_box_rablove_item">
						<view class="invtop">
							{{$t('oi2')}}
						</view>
						<view class="invcode">
							<u-qrcode :size="200" val="uview-plus"></u-qrcode>
						</view>
						<view class="invnum">
							<text>{{$t('oi3')}}：{{maccount}}</text>
						</view>
						<view class="invcopy">
							<view class="insolid">
								<!-- {{$t('oi4')}} -->
							</view>

						</view>
					</view>
				</view>
				<view class="inlian">
					<view class="inlian_item">
						<view class="yncon">{{$t('oi5')}}：</view>
						<view class="inlian_item_c">
							<!-- <image src="@/static/img/yqi.png" mode=""></image> -->
							<view class="hidden-text">https://www.jumpvip.vip/#/pages/password/password?code= {{maccount}}
							</view>
						</view>
						<u-copy :content="'https://www.jumpvip.vip/#/pages/password/password?code='+maccount">
							<view class="copybtn">
								{{$t('oi6')}}
							</view>
						</u-copy>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		memberInvite
	} from '@/api/home.js'
	export default {
		data() {
			return {
				maccount: '',
			}
		},
		mounted() {
			this.fnmemberInvite()
		},
		methods: {
			fnmemberInvite() {
				var params = {
					address: this.$store.state.devAddress
				}
				memberInvite(params).then(res => {
					console.log(res)
					if (res.code == 200) {
						this.maccount = res.msg
					}
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.invite {
		padding: 30rpx;
		box-sizing: border-box;
		margin-top: 100rpx;

		&_box {
			width: 100%;
			border-radius: 36rpx;
			border: 2rpx solid #979797;
			// background: #38404f;
			background: linear-gradient(180deg, #697487 0%, #38404f 100%);

			&_rablove {
				width: 100%;
				height: 818rpx;
				background: #39404F;
				padding: 30rpx;
				box-sizing: border-box;
				position: relative;
				border-radius: 36rpx;

				&_item {
					position: absolute;
					top: -95rpx;
					left: 0;
					right: 0;
					margin: auto;
					box-sizing: border-box;
					background: #FFFFFF;
					padding: 70rpx 0 30rpx;
					box-sizing: border-box;
					width: 90%;
					text-align: center;
					border-radius: 40rpx 40rpx 0 0;

					.invtop {
						color: #6100ff;
						font-size: 42rpx;
						font-weight: 700;
						margin-bottom: 56rpx;
					}

					.invcode {
						margin-bottom: 70rpx;

					}

					.invnum {
						border-radius: 12rpx;
						background: #ffffff;
						box-shadow: 0 0 20px 0 #9797973b;
						padding: 20rpx 40rpx;
						box-sizing: border-box;
						width: 70%;
						margin: 0 auto 60rpx;

						text {
							background-image: linear-gradient(to right, #110F2F, #04003D);
							background-clip: text;
							-webkit-background-clip: text;
							-webkit-text-fill-color: transparent;
							font-size: 30rpx;
							font-weight: 500;
						}
					}

					.invcopy {
						width: 100%;
						height: 60rpx;
						border: 2px solid rgba(214, 167, 249, .24);
						background: rgba(214, 167, 249, .25);
						box-sizing: border-box;
						padding: 0 10rpx;
						box-sizing: border-box;

						.insolid {
							margin-top: 34rpx;
							border-top: 4rpx dashed rgba(214, 167, 249, 1);
							font-size: 30rpx;
							font-weight: 400;
							background-image: linear-gradient(to right, rgba(17, 15, 47, 1), rgba(4, 0, 61, 1));
							background-clip: text;
							-webkit-background-clip: text;
							-webkit-text-fill-color: transparent;
							// padding-top: 16rpx;
						}
					}
				}
			}

			.inlian {
				padding: 30rpx;
				box-sizing: border-box;

				.inlian_item {
					margin-bottom: 26rpx;
					height: 92rpx;
					border-radius: 12rpx;
					opacity: 1;
					border: 2rpx solid rgb(151, 151, 151, 0.2);
					background: rgb(56, 64, 79);
					box-shadow: inset 0 0 4rpx 0 rgba(0, 0, 0, 0.31);
					padding: 24rpx;
					box-sizing: border-box;
					display: flex;
					align-items: center;
					justify-content: space-between;
					color: rgb(255, 255, 255);
					font-size: 28rpx;
					font-weight: 400;

					.yncon {}

					&_c {
						display: flex;
						align-items: center;
						width: 60%;

						image {
							width: 24rpx;
							height: 26rpx;
							margin-right: 10rpx;
						}

						text {}
					}

					.copybtn {
						color: rgb(214, 167, 249);
						margin-right: 16rpx;
					}
				}
			}
		}
	}
</style>